/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86187
 * Date: 2022-04-16
 * Time: 12:35
 */

//Scanner scan = new Scanner(System.in);


//计算 1/1 - 1/2 + 1/3 - 1/4 + 1/5 ... 1/n;
import java.util.Scanner;

public class TestNode1 {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();
        double sum = 0.0;
        int fab = 1;

        for (int i = 1; i <= n ; i++) {

            sum += 1.0 * fab / i;

            fab = -fab;
        }

        System.out.println(sum);
    }
}
